<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>立即执行函数</title>
    <script>
        (function () {
            console.log('你好!');
        })();
    </script>
</head>
<body>

</body>
</html>